Autoimmune hypothyroidism GWAS reveals independent autoimmune and thyroid-specific contributions and an inverse relation with cancer risk

The high prevalence of autoimmune hypothyroidism (AIHT) - more than 5% in human populations - provides a unique opportunity to unlock the most complete picture to date of genetic loci that underlie systemic and organ-specific autoimmunity. Using a meta-analysis of 81,718 AIHT cases in FinnGen and the UK Biobank, we dissect associations along axes of thyroid dysfunction and autoimmunity. This largest-to-date scan of hypothyroidism identifies 418 independent associations (p < 5×10− 8), more than half of which have not previously been documented in thyroid disease. In 48 of these, a protein-coding variant is the lead SNP or is highly correlated (r2 > 0.95) with the lead SNP at the locus, including low-frequency coding variants at LAG3, ZAP70, TG, TNFSF11, IRF3, S1PR4, HABP2, ZNF429 as well as established variants at ADCY7, IFIH1 and TYK2. The variants at LAG3 (P67T), ZAP70 (T155M), and TG (Q655X) are highly enriched in Finland and functional experiments in T-cells demonstrate that the ZAP70:T155M allele reduces T-cell activation. By employing a large-scale scan of non-thyroid autoimmunity and a published meta-analysis of TSH levels, we use a Bayesian classifier to dissect the associated loci into distinct groupings and from this estimate, a significant proportion are involved in systemic (i.e., general to multiple autoimmune conditions) autoimmunity (34%) and another subset in thyroid-specific dysfunction (17%). By comparing these association results further to other common disease endpoints, we identify a noteworthy overlap with skin cancer, with 10% of AIHT loci showing a consistent but opposite pattern of association where alleles that increase the risk of hypothyroidism have protective effects for skin cancer. The association results, including genes encoding checkpoint inhibitors and other genes affecting protein levels of PD1, bolster the causal role of natural variation in autoimmunity influencing cancer outcomes.


Introduction
Hypothyroidism is estimated to affect at least 5% of individuals, though the high rate of undiagnosed cases may underestimate this number by a factor of two (Chiovato, Magri, and Carlé 2019), (Virta and Eskelinen 2011).In areas of the world with iodine su ciency, the most common cause of hypothyroidism is Hashimoto's disease, an autoimmune attack on the thyroid leading to reduced thyroid hormone production.As such, it constitutes the most common autoimmune disease (Conrad et al. 2023), though at the same time is considered vastly underdiagnosed considering the non-speci c and gradual onset of the many clinical symptoms it causes.Early detection is key since treatment and supplementation with levothyroxine (synthetic thyroid hormone T4) can largely alleviate symptoms and prevent longer-term complications.
Given the well-established broad sharing of genetic risk factors across autoimmune diseases, a genetic study of hypothyroidism at scale would be expected to provide signi cant insights into autoimmunity, as well as, speci c insights into thyroid disease that might aid in early detection and effective treatment before signi cant thyroid damage has taken place.
Population-wide biobank resources enable unique, large-scale integration of clinical information across medical domains.Here we take advantage of FinnGen, a project initiated in 2017, to integrate genome information with life medical history in 10% of the Finnish population to detect all treated cases of hypothyroidism (removing any major non-Hashimoto's causes of hypothyroidism) and perform a GWAS of AIHT.Repeating the same de nitions in the widely used UK Biobank resource, we perform and describe here a genome-wide analysis of more than 80,000 AIHT cases, more than twice the sample size of prior studies and yielding 418 hits compared to a maximum of 153 in recent studies (Saevarsdottir et al. 2020), (Kichaev et al. 2019).

Phenotypic De nitions from Registry Data
To pursue a GWAS of AIHT rst required phenotypic de nitions to capture a large but speci c set of autoimmune hypothyroidism.Unlike most autoimmune diseases, which require advanced care in specialty clinics or hospitals where diagnoses are well-recorded, many cases of AIHT, if diagnosed, will be detected in primary care and recognized in health registry data through continuous use of levothyroxine.To use such data, however, required close attention to the removal of individuals who were hypothyroid as a consequence of thyroid ablation due to Graves disease, thyroid cancer, thyroidectomy, and congenital thyroid disease (Methods).Removal of nearly 10,000 such individuals from the broadest de nition resulted in 54,752 cases of AIHT in FinnGen R12, with a tally of 231 genome-wide signi cant hits.Con rming our hypothesis that such phenotypic restrictions would create a more homogeneous phenotype for genetics, the larger, less-speci c GWAS of 64,082 individuals treated for hypothyroidism actually contained substantially fewer (204/231) genome-wide signi cant hits.Of note, we hypothesized that, while there is certainly a shared autoimmune component between Graves' and Hashimoto's, there might also be variants with opposite effects on thyroid function.Thus we intentionally focused the primary scan on AIHT and describe the alignment of the results with the analogous meta-analysis of Graves' disease.

Meta-analysis of autoimmune hypothyroidism
Having optimized the phenotypic de nition in FinnGen, we then implemented a close phenotype analog in UK Biobank data (Methods), identi ed 26,966 cases, and ran a standard inverse variance weighted xed-effects meta-analysis.Using a strict linkage disequilibrium (LD) based de nition of independence (Methods), this meta-analysis (involving a total of 81,718 cases and 732,951 controls) produced a total of 417 independent genetic associations outside the MHC (Supplementary Table 1) and a series of highly signi cant associations within the MHC centered at previously reported common variants spanning the DRB1-DQA1-DQB1 locus (Saevarsdottir et al. 2020).Even conservatively ascribing associations within 1 Mb to the same 'locus' indicates at least 280 distinct genomic regions associated with autoimmune hypothyroidism.As expected with the much greater sample size, this substantially adds to the previously documented association count of 153 (Kichaev et al. 2019)).

Overview of the hits
In 48 of 417 associations, the lead variant is itself, or in very high LD (r 2 > 0.95) with a protein-coding variant (Table 1a), and another 19 having a coding variant with 0.95 > r 2 > 0.70 t.Among these are wellestablished common variants (e.g., PTPN22, SH2B3, FUT2), as well as lower frequency hypomorphic alleles (e.g., TYK2, IFIH1) known to be associated with many autoimmune diseases.16 of the associations are low-frequency variants that are highly enriched in Finns (from 4 to more than 100-fold) (Table 1b) − 12 of which are found only in the FinnGen GWAS because of their low frequency in UKBB.
Notably, 6 of these 12 map onto coding variants noted above.
A total of 51 associations have a minor allele frequency of < 5% in Finland.Sixteen of these 51 (31.4%) are in the most likely 'coding association' (r 2 > 0.95/Table 1) category, while only 32 of the 366 (8.7%) more common variants are -a signi cant (p < .0005)3.5-fold excess which is the likely consequence of both selection (higher effect alleles being kept lower in frequency) and function (higher effect alleles detected in frequency-agnostic GWAS analysis are more often coding than lower effect ones).
The preponderance of associated coding variants at lower frequencies provides the most direct set of novel clues to disease biology.Noteworthy among these ndings include a missense variant in LAG3 (P67T), an inhibitory immune receptor for which inhibitors have been recently approved as immunotherapy in advanced melanoma (Tawbi et al. 2022;Long et al. 2023).No prior signi cant associations to coding variation in LAG3 have been reported.The most signi cant of the novel Finnish associations, however, is a non-coding variant (chr16:27384341:C:CT) roughly 20 kb from the TSS of IL21R.Additionally, rare missense variants in both IRF3 and IRF4 confer protection from AIHT (with observed effect sizes greater than the protective hypomorphic missense variants at TYK2 and IFIH1), and low-frequency risk variants of likely immune relevance are newly documented at NFKBIZ and CD2.function and whether it is associated with a gain of function through loss of autoinhibition or impaired function.Towards this end, we reconstituted ZAP70-de cient Jurkat T cells with variants of interest and monitored TCR signaling.WT ZAP70-reconstituted cells upregulated expression of the activation marker CD69 and induced phosphorylation of SLP76 and ZAP70 after TCR stimulation, whereas parental ZAP70de cient cells did not (Fig. 1).Cells expressing a ZAP70 double tyrosine mutant (Y315A&Y319A) within interdomain B, which is incapable of activation, showed a complete block of activation and SLP76 phosphorylation after TCR stimulation (Fig. 1).Cells reconstituted with ZAP70 T155M exhibited a partial block in activation and phosphorylation of SLP76 (Fig. 1).Thus, the ZAP70 T155M missense variant associated with autoimmunity impairs TCR signaling strength through an incomplete loss of function.
Consistent with this observation, T155M also increases risk to immunode ciencies in FinnGen (p < .0001).), however, have demonstrated that individuals with irAEs may be receiving greater bene t from checkpoint inhibition, an observation con rmed in a recent metaanalysis (Hussaini et al. 2021).In one recent study, anti-PD-L1 atezolizumab-induced thyroid dysfunction was associated with longer survival across 7 trials in 6 cancer types.Furthermore, in one trial, patients with higher hypothyroid polygenic risk scores had both higher rates of atezolizumab-induced thyroid dysfunction and lower risk of death in triple-negative breast cancer (Khan et al. 2021).

Intersection of hypothyroidism with checkpoint inhibition
The relationship between checkpoint inhibition and hypothyroidism in clinical practice, alongside observing individual associations to CTLA4 and LAG3, encouraged us to look further at the role of genetic predisposition.Starting with the other two targets with approved drugs (PD-1 (encoded by PDCD1) and PD-L1 (encoded by CD274), we nd the locus at CD274 contains a nearby upstream genome-wide signi cant hit (rs911760) (along with a second independent hit at neighboring PDCD1LG1).
Binding of CTLA-4 to CD80 and CD86 prevents continued T-cell activation, and among our strongest genome-wide signi cant associations, we observe variants in LD with the well-described CT60 variant at CTLA4 (rs3087243), which is correlated with increased CTLA-4 levels on CD4 + T-cells (Kasela et al. 2017) -consistent with tamping down immunity with consequent lowering of risk to AIHT (beta=-0.155,p = 2.7e-127).We further observe genome-wide signi cant associations at both CD80 and CD86.Eleven variants spanning CD80 (p = 4.3e-14) (and neighboring gene TIMMDC1) are associated with AIHT, and variants at the ILDR1 and CD86 locus are genome-wide signi cant (p = 4.4e-10).Collectively, these genetic ndings suggest a strong relationship between the mechanism of checkpoint inhibition and reduced AIHT.The consistency of the genetic targets and allelic effects of these AIHT hits with the induced effects of checkpoint immunotherapy supports the idea that the irAEs commonly seen in checkpoint immunotherapy represent an on-target effect as suggested by trial studies (Khan et al. 2021).
Further to this intersection, we integrated recently published proteomics data (Sun et al. 2023), nemapped the GWAS hits of 1500 protein levels, and identi ed that 7 of our hypothyroid hits were signi cantly associated with PD-1 levels.In all seven cases, the allele that increased hypothyroid risk increased PD-1 levels with most in the subgroup that were associated with broad autoimmune disease risk and cancer protection described below (Supplementary Table 2) -consistent with excessive T-cell activation contributing to risk of autoimmunity and protection from cancer.

Autoimmunity component
As autoimmune hypothyroidism sits at the nexus between thyroid disease and autoimmunity and occurs at particularly high frequency, we hypothesized that insights into the underpinnings of both systemic autoimmunity and speci c thyroid disease processes would be present.To explore this, we performed a similar meta-analysis of individuals with a nonthyroid-based autoimmune disease (Methods) (excluding anyone with any form of thyroid disease).This is hereafter referred to as 'autoimmune nonthyroid (AInonT)', and the joint FinnGen + UKBB meta-analysis had 70,570 cases compared to 741,401 controls.Unsurprisingly, there was considerable overlap between AInonT and AIHT scans, with 62 of the 417 index variants from AIHT showing a p < 1.2x10 − 4 (.05/417), and 96 of 304 with p < .0024(1/417) − 92 of 96 with the same direction of effect (Supp Table 3).
Thyroid-speci c component To explore the shared effects between AIHT and AInonT and TSH in more detail, we applied linemodels, a Bayesian classi cation algorithm (Pirinen 2023), to compare the effect sizes of the 417 AIHT hits with those in the AInonT and TSH scans separately.We speci cally ask whether a model in which there are two groups of variants (roughly 'shared' and 'AIHT-speci c') ts the observed effect sizes better than a single relationship, and in the two-group case, assign group membership probabilities to each variant.
Comparing AIHT to AInonT, a two-group solution (termed AIHT only and shared AI) was preferable to a one-group solution (p< ) with many variants assigned strongly to one or the other group (63 having > = 99% con dence of being shared, 68 having > = 99% con dence of being associated to AIHT only (Fig. 2, Supplementary Table 3).Running the same comparison between AIHT and TSH summary statistics (Zhou et al. 2020) produced an even more tail-heavy posterior assignment probability distribution among two groups (again preferred strongly over one group (p< ), with 37 having > 99% con dence in the joint AIHT-TSH group, while 285 with 99% con dence in the 'AIHT-only' group.Of note, in this latter comparison, only 396/417 AIHT associations were included since several rare and Finnish-enriched variants were not tested in the TSH study.
Notably, the shared with AInonT and shared with TSH subgroups were signi cantly non-overlapping.The variants in the 99% shared AIHT-AInonT were completely distinct from the 99% shared AIHT-TSH group, with a formal Spearman's correlation across all AIHT loci between the posterior probability of being shared with AInonT and shared with TSH (Supplementary Table 3) producing a rho of -0.29, p = 4.6x10 − 9 )).As less signi cant associations are less able to be assigned con dently to shared or non-shared classes, we estimated sharing proportions from the top half of associations (202 AIHT index variants with p < 1x10 − 11 ) and observe 34% of associations are shared with AInonT and 18% shared with TSH (Fig. 2).
Con rming the functional distinction between these sets, we utilized the above-mentioned UKBB proteomics data where we observe 27 of our index variants are signi cantly associated (p < 5x10 − 8 ) in trans to TSHB (a component of the TSH heterodimer) levels -demonstrating consistent allelic effects where higher TSHB corresponds to AIHT risk.26 of the 27 are among the 37 > 99% con dent AIHT-TSH shared group, while none were in the AIHT-AInonT group.This collective set of ndings demonstrates that the genetic architecture of autoimmune hypothyroidism can be broadly dissected into several distinct independent contributing components -one of which represents processes shared across autoimmune diseases and one of which represents thyroid-speci c functional contributors.
As noted earlier, autoimmune thyroid disease generally refers to both Hashimoto's (hypothyroidism) and Graves' (hyperthyroidism).We utilized the FinnGen + UKBB meta-analysis of Graves' disease (Methods) which had a total sample of 6550 cases and 823242 controls.Despite the much smaller sample, there was, as expected, a highly signi cant overlap with AIHT.Among the 417 AIHT index variants were 56 (at p < 1.2x10 − 4 ) and 101 (at p < .0024)at the thresholds where .05 and 1 expected by chance.These associations were, however, not unidirectional, with 86 being shared and 15 in the opposite direction.This distinction, however, falls along and reinforces the same dimension described in the linemodels analysis.Speci cally, 10 of the 15 loci where Hashimoto's and Graves' have opposite direction effects are in the 99% AIHT-TSH shared group, with 0 in the 99% shared AI (AIHT-AInonT) group, while among the 86 shared direction variants, 22 were in the 99% shared AI group with 0 in the AIHT-TSH shared group.Thus the two common forms of autoimmune thyroid disease appear to tightly share their autoimmune component, while their thyroid-speci c component is also in common but acts in opposite directions of risk and protection in the two diseases.

Inverse genetic risk shared with skin cancer
While the relationships to autoimmunity and thyroid function are not surprising, we sought to use the comprehensive phenotypic association in FinnGen to explore the potential overlap with other common diseases via both overall assessments of common disease incidence with AIHT genetic risk, genetic correlation as well as by examination of coincident genome-wide signi cant loci.AIHT PRS was positively correlated (at a conservative threshold of p < 1e-5) with hundreds of FinnGen endpointsunsurprisingly led by nearly all autoimmune and thyroid disease phenotypes.However, a signi cant negative relationship was observed for seven FinnGen cancer endpoints (Supplementary Table 5), led by the incidence of basal cell carcinoma (r=-0.07,p = 1.7e-17) and all skin cancers (r = -0.06,p = 8.3e-13) with less signi cant negative overlaps also seen for prostate cancer and the "all cancer" phenotype.
To explore this further, we then performed the analogous FinnGen + UKBB meta-analysis of skin cancer (including melanoma and non-melanoma − 68822 cases and 657740 controls) and examined results at the 417 AIHT index variants (Supplementary Table 3).In this set, there were 13 loci exceeding genome-wide signi cance, 26 at a comparison-wide level of signi cance (p < 1.2x10 − 4 ) and a total of 48 at a level expected once by chance in 417 loci (p < .0024).Almost as striking as the excess itself, 24 of the 26 (and 42 of the 48) were instances where the effects on risk in skin cancer and hypothyroidism were in opposite directions.
We again utilized linemodels and identi ed an AIHT-only and AIHT-skin cancer shared group, the latter grouping with a negative slope indicating variants at which hypothyroid risk alleles correspond to skin cancer protective alleles, and assigned posterior probabilities of assignment to each group for all 417 loci.We then performed Spearman correlation between the probability membership in the AIHT-skin cancer shared group with the previously de ned probabilities of AIHT-AInonT and AIHT-TSH shared groupings.The AIHT-skin cancer membership was positively correlated with AIHT-AInonT (rho = 0.22, p = 6.4x10 − 6 ) and negatively correlated with AIHT-TSH sharing (rho=-0.25,p = 6.2x10 − 7 ), indicating that the shared component of the genetic architecture of skin cancer and AIHT represents an immune program rather than one speci c to the thyroid.Among the 15 variants with > 99% posterior assignment to both AInonT and skin cancer shared groups are well known missense variants in PTPN22, TYK2, IFIH1, FUT2 and CCDC88B, as well as the low-frequency ZAP70 and IRF3 variants noted above, an intronic FLT3 variant that prematurely truncates FLT3, and several other established immune-mediated disease loci at CTLA4, BACH2 and IL2RA.
To con rm these relationships in independent samples, we performed an association study of a hypothyroidism polygenic risk score (PGS) from UKBB across all phenotypes in FinnGen (Methods).As  6).By contrast, strong negative association was found between the UKBB PGS and multiple cancer endpoints, led by basal cell carcinoma (OR = 0.91, p = 3.0x10 − 39 ), all skin cancer (OR = 0.92, p = 8.4x10 − 36 ) and the umbrella 'all cancer' endpoint (OR = .96,p = 6.0x10 − 26 ) as well as individually signi cant breast and prostate cancer endpoints.(Supplementary Table 7) Results were robust to two additional analyses, one of which removed the MHC from PGS calculation and evaluation, and a second which removed all FinnGen AIHT cases (to con rm independence from the diagnosed phenotype self-evidently related to the PGS).Naturally, this second analysis removes signi cant relationships to thyroid-related phenotypes but leaves the cancer and other autoimmune disease relationships intact (Supplementary Tables 8 and 9).

Discussion
Using two large-scale biobanks with broad diagnostic and medication information, FinnGen and the UK Biobank, we present here the largest genome-wide association study to date in autoimmune hypothyroidism.Taking advantage of the extensive data available in these biobanks, including prescription medication use, provided a more complete ascertainment of cases, while the diagnostic coverage in these resources permitted the exclusion of other common thyroid conditions.The resultant analysis included a total of 81,718 cases and yielded a total of 417 independent genome-wide signi cant variants in addition to the MHC, roughly doubling the numbers found in the largest previous studies (Kichaev et al. 2019;Saevarsdottir et al. 2020).
Sixty-seven of these 417 associations (16%) contained coding variants that were, or were in high LD with, the lead variant.As coding variants were twice as often found in low-frequency association credible sets, these provided the most interpretable pointers to novel biological insights into AIHT.Among the coding variants likely driving associations were low-frequency coding variants in both IRF3 and IRF4, which, similar to the hypomorphic low-frequency variants in IFIH1 and TYK2 also seen here, broaden the set of disease protective perturbations likely acting through interferon response.This connection is further supported by a common missense variant at TLR3, another interferon-inducing component of antiviral immunity, and by a common missense variant in the interferon-inducible IFITM2.Another notable association at PER3 connects circadian regulation to AIHT via two tightly linked missense variants previously linked to morning chronotype and now demonstrated to be protective from AIHT.
We characterize the function of another of these coding variants where we nd that ZAP70:T155M demonstrates a unique pro le in that it is associated with a partial loss of function and autoimmunity, while more complete loss of function hypomorphic alleles homozygous produce severe combined immunode ciencies (Shari nejad et al. 2020).Additional complex ZAP70 genotypes associated with autoimmunity have been discovered.For example, a compound heterozygous individual harboring both loss of function ZAP70 R192W variant and gain of function R360P variant led to autoimmunity, but the combined effects of both alleles were required to precipitate disease (A.Y. Chan et al. 2016).Taken collectively, human genetics evidence suggests ZAP70 function must be optimized within a narrow range such that partially impaired activity or enhanced activity elicits autoimmunity (Ashouri et al. 2022).Mouse models have been absolutely indispensable in conclusively demonstrating this concept and establishing the mechanism of action.Hypomorphic ZAP70 alleles generated from a chemical mutagenesis screen in mice were shown to impair TCR signaling strength, resulting in altered thymocyte development and selection of an autoreactive TCR repertoire associated with the development of dsDNA antibodies and hyper-IgE syndrome (Siggs et al. 2007).Similarly, a spontaneously arising point mutation of ZAP70 in SKG mice led to a partial loss of function and impaired negative selection of autoreactive T cells resulting in arthritis (Sakaguchi et al. 2003).Adoptive transfer of naïve SKG T cells into immunocompromised recipients was su cient to induce arthritis, suggesting impaired central and peripheral tolerance (Ashouri et al. 2019).The ZAP70 T155M variant associated with autoimmune thyroid disease appears to act through a similar mechanism of impaired TCR signaling resulting in loss of tolerance.This is likely to occur through combined effects of impaired negative selection of autoreactive T cells, lymphopenia-induced homeostatic expansion of pathogenic T cells, defective Treg development/function, and resistance to peripheral tolerance mechanisms such as Treg suppression or anergy induction (Liston, Enders, and Siggs 2008).These ndings have important implications for the treatment of autoimmunity.Having demonstrated that the direction of effect for the ZAP70 T155M risk variant is a partial loss of function, targeting ZAP70 kinase activity with inhibitors to treat autoimmunity could come with unanticipated consequences.Complete inhibition of ZAP70 may ameliorate T celldriven autoimmunity at the expense of immunode ciency, whereas partial inhibition of ZAP70 may exacerbate dysregulation of self-tolerance.
The sizable number of GWAS hits in this scan enabled us to not only detect signi cant polygenic overlaps with other phenotypes such as non-thyroid autoimmune diseases and TSH levels (neither of which is individually surprising) but also enable the determination that these particular overlaps make up distinct, non-overlapping components of AIHT risk.Through the use of Bayesian linemodels, we estimate 34% of AIHT associations are shared with autoimmune diseases more broadly, and 18% are shared with variation that elevates TSH levels unrelated to immunity.The parallel analysis of Graves' disease and AIHT indicates that while there is widespread same-direction sharing of the autoimmune components, the thyroid/TSH alleles act in opposite directions consistent with the hyper versus hypothyroid character of each disease.
PRS analysis demonstrated a correlation of AIHT PRS to lower risk of skin, as well as breast and prostate cancer.Considerable sharing between the AIHT and skin cancer GWAS indicated that the opposite effect alleles conferring risk to AIHT and protection from skin cancer were concentrated in the autoimmune component of AIHT rather than being thyroid function related.While skin cancer, and particularly basal cell carcinoma, showed uniquely strong opposite direction effects, the same highly signi cant observation in prostate and breast cancer suggests this is most likely a consequence of general immune surveillance and response to emergent solid tumors, which, while likely of differential relevance to different tumor types, is not speci c to skin.
Further to this connection, the results also ag genetic variation associated with AIHT implicating the majority of genes involved in successful targets of checkpoint immunotherapy, including a novel rare coding variant in LAG3.In addition, seven AIHT risk alleles are signi cantly associated with PD-1 levels in recently published proteomic data from the UK Biobank.Moreover, the genetic intersection between AIHT risk and protection from skin cancer further sheds light on published observations that individuals with irAEs receive greater bene ts from checkpoint immunotherapy.Demonstration that the same hypothyroid genetic risk that predisposes to thyroid irAEs and improved immunotherapy outcomes represents a general population-wide signature of cancer protection suggests naturally arising genetically mediated variation in immune surveillance or function, partially encoded in the same checkpoint pathway, is a signi cant contributor to inter-individual variation in cancer risk and potentially points to mechanisms that could be effective in prevention as well as treatment.

Study Cohort
The FinnGen study (https://www.nngen./en) is a public-private partnership founded in 2017, including Finnish universities, biobanks, and hospital districts, as well as several pharmaceutical companies.The To create a large but speci c set of autoimmune hypothyroidism individuals, we rst collected all individuals with a diagnosis of hypothyroidism (most commonly ICD10 E03.9) and who also had 3 + re lls of levothyroxine.From this set of individuals, we then excluded those who had thyrotoxicosis, thyroidectomy, iodine de ciency, and individuals with pituitary diseases likely to have central hypothyroidism of non-autoimmune origin.Detailed descriptions of the FinnGen phenotype can be found at https://risteys.nregistry./endpoints/E4_HYTHY_AI_STRICT.The UKBB phenotype was created using similar criteria and detailed coding can be found in the Supplementary information.
To discriminate autoimmune versus thyroid loci we created a set of individuals with autoimmune disease but who did not have hypothyroidism or autoimmune hyperthyroidism.The complete list of selected autoimmune diseases is listed at https://risteys.nregistry./endpoints/AUTOIMMUNE.For the phenotype AUTOIMMUNE_NONTHYROID in both FinnGen and UKBB, from the selected individuals with autoimmune disease, we then excluded those with thyroidectomy, use of levothyroxine or carbimazole, any individuals in the strict autoimmune hypothyroidism cases described above, and those with autoimmune hyperthyroidism (ICD-10: E05[0|9] ICD-9: 2420).

Meta-analysis and de nition of LD-independent associations
Genotyping, QC and imputation were performed as described in detail in the FinnGen resource paper (Kurki et  after QC and population clustering described on the Pan UKBB website) was performed using inversevariance weighted meta-analysis.
As high-resolution ne-mapping algorithms have not been shown to be fully reliable in the context of meta-analyses particularly when performed using different genotyping and imputation techniques, we opted conservatively to ag only index variants representing the most signi cantly associated variant in con dently LD independent loci.LD independent associations were determined as follows: starting with the most signi cant association with p < 5e-8 on each chromosome, around each genome-wide signi cant variant, a +/-2Mb window was screened.A dynamic LD threshold for each association is de ned as T = min (0.1, r 5 ) where r 5 is de ned as the r 2 value at which the expected residual chi-square would be 5.0.Secondary associations were counted only if they were genome-wide signi cant and r 2 to any more signi cant listed association was < T. Because of potential inaccuracy of low values of r 2 , at particularly strong associations where T < 0.02 (that is, residual association signal may exist even at very low values of r 2 ) secondary associations were not de ned within 1Mb of such signals.Nearby signals were con rmed as independent using full conditional analysis in FinnGen on top signals using Regenie and owing to the limited accuracy of pairwise LD inference beyond two signals, we only report here two signals within 1 Mb with the exception of a handful of examples where three signals within 1 Mb were all conditionally independently associated at genome-wide signi cance in FinnGen.

Bayesian classi cation of association results
Linemodels (https://github.com/mjpirinen/linemodels)was used to explore the existence of and classify individual variants into, clusters based on bivariate effects.Using as input the (beta,se) pairing from two GWAS analyses for a set of variants, linemodels probabilistically clusters variants into groups, providing both a likelihood of each number of groups and posterior probability of assignment to each group.Linemodels consist of three parameters: scale (the magnitude of effect), slope (the multiplicative relationship between the effects on each phenotype) and correlation (the expected consistency with the expected values).We set the scale parameter to 0.6, such that 95% of the effect sizes are within two times the scale parameter for all groups.We also chose a correlation parameter of 0.99 to permit modest deviation from the exact best-t slope.Models with 1 or 2 slopes were t using the EM-algorithm implemented in linemodels and likelihood-ratio test used to compare models.For the comparisons involving AInonT and SKIN, one of the slopes was set to 0 in order to capture only those variants that belong to AIHT, while the other slope was optimized with an EM-algorithm.The slopes for shared groups were 0.447 for AInonT, and − 0.384 for SKIN.When running linemodels for TSH, both slopes were allowed to optimized (since AIHT is so common, purely autoimmune associations will induce a residual effect on TSH population-wide) and were found to be 0.137 and 0.964.After optimizing slopes, we used an iterative Gibbs Sampler to assign group probabilities.

Figures
Figures

Figure 1 See
Figure 1

Figure 2 Scatter
Figure 2 (Zhou et al. 2020oimmunity, congenital hypothyroidism most often results from gene defects in thyroid development (agenesis or dysgenesis) or production of thyroid hormones (dyshormonogenesis), and have been explored in animal and cellular models (López-Márquez et al. 2021).Cross-referencing our GWAS with the Genomics England clinical panel for congenital hypothyroidism (https://panelapp.genomicsengland.co.uk/panels/31/download/34/) indicates independent common variation at six of these genes are associated to AIHT (Supplementary Table4), providing pointers to the thyroid-speci c effects in our scan.Expanding to population-wide hormone production variability, thyroid-stimulating hormone (TSH) levels are broadly used in clinical settings to diagnose hypothyroidism.A recent publication(Zhou et al. 2020) provided a scan of population TSH levels in individuals with no known thyroid disease across multiple biobanks (not including FinnGen or UKBB) and uncovered 74 genome-wide signi cant associations to serum TSH levels.Summary statistics from this study, alongside our study, enable a larger-scale assessment of which of our associations arises from a direct impact on thyroid development or function.Our 417 AIHT index variants similarly show a highly signi cant excess of overlapping associations with 67 (at p < 1.2x10 − 4 ) and 83 (at p < .0024)associated with TSH levels in the earlier study.Consistent with expectation, 80 of 83 overlaps show increasing AIHT risk corresponds to higher TSH levels.
Phenotypic de nitions in FinnGen and UK BiobankExact de nitions of ICD[8,9,10] diagnoses, medications, and procedures for all FinnGen phenotypes are publicly available at https://risteys.nregistry./ using the tag names listed in the summary below.Detailed de nitions of UKBB phenotypes are included in the Supplementary info ("Detailed Phenotype Descriptions").